package 蓝桥杯;

import java.util.Scanner;

public class zifushanchu {
    public static void main(String[] args) {
        Scanner s1 = new Scanner(System.in);
        String str = s1.nextLine();
        if(!str.isEmpty()) {
            String s = s1.next();
            char ch = s.charAt(0);
            StringBuilder sb = new StringBuilder();
            for(int i = 0 ; i < str.length() ; i++) {
                if(str.charAt(i) != ch) {
                    sb.append(str.charAt(i));
                }
            }
            System.out.println(sb);
        }

    }
}
